package com.donger.auth.component;

import org.springframework.security.core.userdetails.UserDetails;
import org.springframework.security.core.userdetails.UserDetailsService;
import org.springframework.security.core.userdetails.UsernameNotFoundException;


/**
 * BootUserDetailsService
 *
 * @author lhl
 */
public interface BootUserDetailsService extends UserDetailsService {

    /**
     * 根据社交code 登陆
     * 手机号 phone 也可登陆
     *
     * @param code
     * @return
     * @throws UsernameNotFoundException
     */

    UserDetails loadUserBySocial(String code) throws UsernameNotFoundException;

}
